
<form name="editForm" role="form" novalidate ng-submit="vm.save()">

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myMenuLabel" data-translate="gatewayApp.menu.home.createOrEditLabel">Create or edit a Menu</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.menu.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.menu.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.menu.clickKey" for="field_clickKey">Click Key</label>
            <input type="text" class="form-control" name="clickKey" id="field_clickKey"
                    ng-model="vm.menu.clickKey"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.menu.lv" for="field_lv">Lv</label>
            <input type="number" class="form-control" name="lv" id="field_lv"
                    ng-model="vm.menu.lv"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.menu.name" for="field_name">Name</label>
            <input type="text" class="form-control" name="name" id="field_name"
                    ng-model="vm.menu.name"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.menu.sort" for="field_sort">Sort</label>
            <input type="number" class="form-control" name="sort" id="field_sort"
                    ng-model="vm.menu.sort"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.menu.menuType" for="field_menuType">Menu Type</label>
            <select class="form-control" name="menuType" ng-model="vm.menu.menuType" id="field_menuType">
                <option value="VIEW" data-translate="gatewayApp.MenuType.VIEW">VIEW</option>
            </select>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.menu.url" for="field_url">Url</label>
            <input type="text" class="form-control" name="url" id="field_url"
                    ng-model="vm.menu.url"
                     />
        </div>

        <div class="form-group">
            <label data-translate="gatewayApp.menu.menu" for="field_menu">Menu</label>
            <select class="form-control" id="field_menu" name="menu" ng-model="vm.menu.menuId" ng-options="menu.id as menu.id for menu in vm.menus"            >
                <option value=""></option>
            </select>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
